import http from 'node:http'
// import schedule from 'node-schedule'

export const open = (callback) => {
  const server = http.createServer((res, req) => {

  }).listen(12345, () => {
    console.log('启动一个服务')
  })
  server.on('listening', () => {

    // var rule = new schedule.RecurrenceRule();

    // rule.dayOfWeek = [0, new schedule.Range(1, 6)];

    // rule.hour = 9;

    // rule.minute = 30;
    // var j = schedule.scheduleJob(rule, () => {
    //   callback()
    // });
    // schedule.scheduleJob('* * * * * *', () => {
      // });
      setTimeout(() => {
        console.log(new Date().toString());
        
      },1000)
  })
}
